Skip to content

fix(publish): timeout + retry; one template's failure no longer aborts the run#21

Merged
xuyushun441-sys merged 2 commits into
mainfrom
chore/harden-publish-timeout-retry
Jun 4, 2026
Merged

fix(publish): timeout + retry; one template's failure no longer aborts the run#21
xuyushun441-sys merged 2 commits into
mainfrom
chore/harden-publish-timeout-retry

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

The staging marketplace publish died mid-run: the control plane is a cold singleton, and a heavy version POST exceeded undici's default 5-min headers timeout → threw → killed the whole script. Only the first template (compliance) published; the rest never ran.

  • postJson: explicit AbortController timeout (PUBLISH_TIMEOUT_MS, default 240s) + retry (PUBLISH_RETRIES, default 4) with backoff on timeout / network / 5xx. 4xx (incl. 409) returns immediately. Exhausted retries → structured failure, no throw.
  • main loop: wrap publishOne in try/catch + continue — every template is attempted; failures collected + reported; exit 1 only at the end.

Net: a cold start or one stuck package no longer blocks the others, and transient timeouts self-heal on retry. Fixes the partial publish (only compliance@0.1.3 landed; runs 26935994124 + 26936304840 both died on content).

🤖 Generated with Claude Code

os-zhuang and others added 2 commits June 4, 2026 15:08
…longer aborts the run

The marketplace publish died mid-run against staging: the control plane is a
cold singleton, and a heavy version POST exceeded undici's default 5-min headers
timeout, which threw and killed the whole script — so only the first template
published and the rest never ran.

- postJson: explicit AbortController timeout (PUBLISH_TIMEOUT_MS, default 240s)
  + retry (PUBLISH_RETRIES, default 4) with backoff on timeout / network error /
  5xx. 4xx (incl. 409 "already published") returns immediately. On exhausted
  retries it returns a structured failure instead of throwing.
- main loop: wrap publishOne in try/catch and continue — every template is
  attempted; failures are collected and reported, exit 1 only at the end.

Net: a cold start or one stuck package no longer blocks the other templates from
publishing, and transient timeouts self-heal on retry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit a361fd2 into main Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants